package com.dnjn.happiness.biz.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dnjn.happiness.biz.domain.OutletReply;
import com.dnjn.happiness.biz.domain.vo.OutletReplyVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 解忧馆回复记录Mapper接口
 *
 * @author happiness
 * @date 2024-03-13
 */
public interface OutletReplyMapper extends BaseMapper<OutletReply> {

    @Select(" SELECT u.nick_name,r.content,r.grade FROM biz_outlet_reply r LEFT JOIN sys_user u USING(user_id) WHERE r.outlet_id = #{outletId} AND deleted = '0' ")
    List<OutletReplyVO> selectReplyListByOutletId(Long outletId);

}
